import type { RouteRecordRaw } from 'vue-router'
import LayoutView from '@/layout/index.vue'

export const constantRoutes: RouteRecordRaw[] = [
  {
    path: '/layout',
    name: 'layout',
    component: LayoutView,
    meta: {
      icon: 'h',
      title: '主页',
    },
    redirect: '/',
    children: [
      {
        path: '/',
        name: 'home',
        children: [],
        component: () => import('@/views/home/index.vue'),
        meta: {
          icon: 'h',
          title: '主页',
        },
      },
      {
        path: '/not-found',
        name: 'not-found',
        children: [],
        component: () => import('@/views/notFound/404.vue'),
        meta: {
          icon: 'NotFound',
          title: '404',
        },
      },
    ],
  },
  {
    path: '/login',
    name: 'login',
    children: [],
    component: () => import('@/views/login/index.vue'),
    meta: {
      icon: 'login',
      title: '登录',
    },
  },
]
